home *** CD-ROM | disk | FTP | other *** search
/ 100 Plus Great Games 2 / 100PLUSV2.BIN / games / BetsyRoss.dxr / 00059_foundation cards.ls < prev    next >
Encoding:
Text File  |  2002-01-25  |  1.2 KB  |  36 lines

  1. on beginSprite me
  2.   global foundation
  3.   foundation.addProp(symbol(string(me.spriteNum)), new(script("foundationobj"), []))
  4.   foundation[symbol(string(me.spriteNum))].addcards(new(script("card"), me.spriteNum))
  5. end
  6.  
  7. on mouseEnter me
  8.   global equalvalue, hotcard, waste, foundation
  9.   if member("ftext" & string(foundation.findPos(symbol(string(me.spriteNum))))).text <> "Complete" then
  10.     if value(member("ftext" & string(foundation.findPos(symbol(string(me.spriteNum))))).text) <= 13 then
  11.       if (the clickOn <> 0) and (the clickOn <> me.spriteNum) then
  12.         if sprite(the clickOn).visible = 1 then
  13.           if waste.count > 0 then
  14.             if the clickOn = waste[waste.count].spnum then
  15.               if string(waste[waste.count].rankvalue) = member("ftext" & string(foundation.findPos(symbol(string(me.spriteNum))))).text then
  16.                 equalvalue = 1
  17.                 hotcard = me.spriteNum
  18.               else
  19.                 equalvalue = 0
  20.                 hotcard = 0
  21.               end if
  22.             end if
  23.           end if
  24.         end if
  25.       end if
  26.     end if
  27.   end if
  28. end
  29.  
  30. on mouseLeave me
  31.   global equalvalue, hotcard
  32.   equalvalue = 0
  33.   hotcard = 0
  34.   checkwin()
  35. end
  36.